(function(window,$,undefined){var _block_namespaces_=window._block_namespaces_||(window._block_namespaces_={});var name="block21044";var block21044=_block_namespaces_[name]||(_block_namespaces_[name]={});$.extend(block21044,{"init":innit});function innit(nodeObj){if(!!!nodeObj)return;var $selector=$("div[data-settingid\x3d"+nodeObj.settingId+"]");$selector.find("style[styleDefault-block]").remove();var _height=$selector.find(".nav-row").height();$selector.find(".block21044").height(_height);if($(window).width()> 768){controlArrow();navPosition()}$(window).resize(function(){var innerWidth=$(window).width();if(innerWidth>768){controlArrow();navPosition()}if(innerWidth>=900)$selector.find(".mobile-close").hide();else{initHeight=$selector.find(".mobile-row").find(".blockNavBar").height();if($selector.find(".mobile-row").css("transform")!=="matrix(1, 0, 0, 1, 0, 0)")$selector.find(".mobile-close").hide();else $selector.find(".mobile-close").show()}});$selector.find(".status_login").on("click",function(){if($selector.find(".aflex").css("opacity")== "0")$selector.find(".aflex").css("opacity",1);else $selector.find(".aflex").css("opacity",0)});$selector.find(".userLoginStatus").on("click",function(){if($selector.find(".logins").css("opacity")=="0"){$selector.find(".logins").css("opacity",1);$selector.find(".loginul").show()}else{$selector.find(".logins").css("opacity",0);$selector.find(".loginul").hide()}});var mobilePrev=``;$selector.find(".mobile-row").find(".blockNavBar").find(".shi").html(mobilePrev); var searchHtml=$selector.find(".header-row").find(".header-search").html();$selector.find(".mobile-row").find(".mobile-nav-header").html(searchHtml);var navHtml=$selector.find(".header-row").find(".header-menu").html();$selector.find(".mobile-row").find(".mobile-nav-menu").html(navHtml);$selector.find(".mobile-row").find(".mobile-nav-menu").find(".nav-li").each(function(){if($(this).find(".subWra").length!==0)$(this).find(".shi").html("\x3ci class\x3d'font-icon block-icon block-icongengduo'\x3e\x3c/i\x3e")}); $(window).scroll(function(){var _height=$selector.find(".nav-row").height();$selector.find(".block21044").height(_height);if($(document).scrollTop()>50){$selector.find(".nav-top").css("height","0");$selector.find(".nav-row").css("top","0").css("position","fixed")}else if($(document).scrollTop()<50){$selector.find(".nav-top").css("height","");$selector.find(".nav-row").css("top","0").css("position","")}});var noChild="";$selector.find(".header-row").find(".nav-li").each(function(){if($(this).find(".sub").length!== 0){$(this).find(".but i").css("display","block");$(this).hover(function(){$(this).find(".sub").addClass("subActive")},function(){$(this).find(".sub").removeClass("subActive")});noChild=$(this).find(".sub").find(".ulSub").html();$(this).find(".single-parent").html(noChild);$(this).find(".sub").find(".single-parent").find(".liSub").each(function(){if($(this).hasClass("has03sub")==true)$(this).css("display","none");else $(this).addClass("level-2")});$(this).find(".sub").find(".ulSub").find(".liSub").each(function(){if($(this).hasClass("has03sub")== false)$(this).css("display","none")})}});$selector.find(".header-row").find(".clickShow").off("click").on("click",function(e){e.stopPropagation();if($selector.find(".header-row").find(".payCoin-menu").css("display")=="none"){$selector.find(".header-row").find(".payCoin-menu").fadeIn(300);$selector.find(".header-row").find(".clickShow").find("i").addClass("toggle")}else{$selector.find(".header-row").find(".payCoin-menu").fadeOut(300);$selector.find(".header-row").find(".clickShow").find("i").removeClass("toggle")}}); $(document).click(function(){$selector.find(".header-row").find(".payCoin-menu").fadeOut(300);$selector.find(".header-row").find(".clickShow").find("i").removeClass("toggle")});$selector.find(".payCoin-menu").find(".payCoin-item").click(function(){$selector.find(".header-row").find(".payCoin-menu").fadeOut(300);$selector.find(".header-row").find(".clickShow").find("i").removeClass("toggle")});$selector.find(".header-row").find(".search-wrap_wrap").click(function(){$selector.find(".header-row").find(".search-input").show(300); $selector.find(".aflex").css("opacity",0);$selector.find(".logins").css("opacity",0)});$selector.find(".header-row").find(".closeBox").click(function(){$selector.find(".header-row").find(".search-input").hide(300)});$selector.find(".header-row").find(".header-icon").click(function(){$("html,body").css("overflow","hidden").css("height","100%");$selector.find(".mobile-background").show();$selector.find(".mobile-row").css("transform","translateX(0)");$selector.find(".mobile-close").css("display","block")}); $selector.find(".mobile-background").click(function(){$("html,body").css("overflow","").css("height","");$selector.find(".mobile-background").hide();$selector.find(".mobile-row").css("transform","translateX(-103%)");$selector.find(".mobile-close").css("display","none")});$selector.find(".mobile-close").click(function(){$("html,body").css("overflow","").css("height","");$selector.find(".mobile-background").hide();$selector.find(".mobile-row").css("transform","translateX(-103%)");$selector.find(".mobile-close").css("display", "none")});$selector.find(".mobile-row").find(".clickShow").off("click").on("click",function(){if($selector.find(".mobile-row").find(".payCoin-menu").css("display")=="none"){$selector.find(".mobile-row").find(".payCoin-menu").fadeIn(300);$selector.find(".mobile-row").find(".clickShow").find("i").addClass("toggle")}else{$selector.find(".mobile-row").find(".payCoin-menu").fadeOut(300);$selector.find(".mobile-row").find(".clickShow").find("i").removeClass("toggle")}});$selector.find(".mobile-nav-localization").find(".payCoin-menu").find(".payCoin-item").click(function(){phoenixSite.payCoinExchange.handleElement($("body")); var newCoinHtml=$(this).find(".payCoin-item-text").html();$selector.find(".mobile-row").find(".payCoin_text").find(".payCoin-item-text.nav_text").html(newCoinHtml);$selector.find(".mobile-row").find(".payCoin-menu").fadeOut(300);$selector.find(".mobile-row").find(".clickShow").find("i").removeClass("toggle")});$selector.find(".mobile-row").find(".search-wrap_wrap").click(function(){$selector.find(".mobile-row").find(".search-input").show(300);$selector.find(".mobile-close").hide()});$selector.find(".mobile-row").find(".closeBox").click(function(){$selector.find(".mobile-row").find(".search-input").hide(300); $selector.find(".mobile-close").show()});var initHeight=$selector.find(".mobile-row").find(".blockNavBar").height();$selector.find(".mobile-row").find(".nav-li").each(function(){$(this).find(".shi").click(function(){if($(this).parent().find(".subWra").length!==0){if($(this).parent().find(".liSub").eq(0).find("a").hasClass("backLevel02")==false){var clickHtml=$(this).parent().find(".subWra").find(".ulSub").html();var href02=$(this).parent().find(".but").attr("href");var clickText=$(this).parent().find(".but").text(); var supplyLevel02=`
  • BACK
  • ${clickText}
  • `;var combination=supplyLevel02+clickHtml;$(this).parent().find(".subWra").find(".ulSub").html(combination)}$(this).parent().find(".has03sub").each(function(){var isExist=$(this).find(".hh").children().length;if(isExist<=2){var hhHtml=$(this).find(".hh").html();var sub03=`
    `; $(this).find(".hh").html(sub03+hhHtml)}});var newHeight=$(this).parent().find(".subWra").find(".ulSub").innerHeight();console.log(newHeight);$selector.find(".mobile-row").find(".blockNavBar").height(newHeight);$(this).parent().find(".subWra").addClass("mobileActive");$(this).parent().find(".ulSub").find(".liSub").eq(0).click(function(){$(this).parent().parent().parent().parent().height(initHeight);$(this).parent().parent().removeClass("mobileActive")})}else $(this).parent().find(".but").find(".block-icongengduo").css("display", "none");$(this).parent().find(".subWra").find(".has03sub").each(function(){$(this).find(".hh").find(".shi1").click(function(){if($(this).parent().find(".nav03-liSub").eq(0).find("a").hasClass("backLevel03")==false){var clickHtml03=$(this).parent().find(".nav03-ulSub").html();var href03=$(this).parent().find(".textBox").find("a").attr("href");var clickText03=$(this).parent().find(".textBox").find("a").text();var supplyLevel03=``; var combination03=supplyLevel03+clickHtml03;$(this).parent().find(".nav03-ulSub").html(combination03)}var nav03liSub=$(this).parent().find(".nav03-ulSub").find(".nav03-liSub").innerHeight();var nav03liSubLength=$(this).parent().find(".nav03-ulSub").find(".nav03-liSub").length;var newHeight03=nav03liSub*nav03liSubLength+10;$selector.find(".mobile-row").find(".blockNavBar").height(newHeight03);$(this).parent().find(".nav03-ulSub").addClass("mobileActive02");var initHeight02=$(this).parent().parent().parent().height(); $(this).parent().find(".nav03-ulSub").find(".nav03-liSub").eq(0).click(function(){$(this).parent().parent().parent().parent().parent().parent().parent().height(initHeight02);$(this).parent().removeClass("mobileActive02")})})})})});function controlArrow(){var menuWidth=$selector.find(".header-menu").width();menuWidth=menuWidth+48;$selector.find(".button-next").css("left",menuWidth+"px")}function navPosition(){var navigationWidth=Math.floor($selector.find(".header-left-row .navigation").width());var arrayObj= new Array;var translateX=0;var ulWidth=0;$selector.find(".header-left-row .navBox").find(".navTile").each(function(){ulWidth+=Math.floor($(this).width())+40});var ulWidth02=ulWidth-20;var windowWidth=$(window).width();if(ulWidth02<=navigationWidth){console.log(1);$selector.find(".header-left-row .navBox").width(ulWidth+"px");$selector.find(".header-left-row .navCenter").css("padding","0px");$selector.find(".header-left-row .button-prev").hide();$selector.find(".header-left-row .button-next").hide()}else{$selector.find(".header-left-row .navBox").width(ulWidth+ "px");$selector.find(".header-left-row .navCenter").css("padding","0px 20px");$selector.find(".header-left-row .button-prev").hide();$selector.find(".header-left-row .button-next").show()}var navigationLeft=Math.floor($selector.find(".header-left-row .navigation").offset().left);var navigationRight=Math.floor($selector.find(".header-left-row .navigation").width())+navigationLeft;$selector.find(".header-left-row .button-prev").click(function(){var navBoxLeft=Math.floor($selector.find(".header-left-row .navBox").offset().left); var navBoxRight=Math.floor($selector.find(".header-left-row .navBox").width())+navigationLeft;var navigationLeft=Math.floor($selector.find(".header-left-row .navigation").offset().left);var navigationRight=Math.floor($selector.find(".header-left-row .navigation").width())+navigationLeft;if(navBoxLeft=0;i--){var lengths=liLength-i-1;var thisLeft=Math.floor(liDom.eq(i).offset().left); var thisRight=Math.floor(liDom.eq(i).width())+thisLeft;if(thisLeft=0){$selector.find(".header-left-row .button-prev").hide();$selector.find(".header-left-row .button-next").show()}else{$selector.find(".header-left-row .button-prev").show(); $selector.find(".header-left-row .button-next").show()}});$selector.find(".header-left-row .button-next").click(function(){var moveWidth=$(window).width();var navigationLeft=Math.floor($selector.find(".header-left-row .navigation").offset().left);var navigationRight=Math.floor($selector.find(".header-left-row .navigation").width())+navigationLeft;var navBoxLeft=Math.floor($selector.find(".header-left-row .navBox").offset().left);var navBoxRight=Math.floor($selector.find(".header-left-row .navBox").width())+ navigationLeft;var arrayLength=arrayObj.length;if(navBoxRight>navigationRight){$selector.find(".header-left-row .navTile").each(function(e){var thisLeft=Math.floor($(this).offset().left);var thisRight=Math.floor($(this).width())+thisLeft;if(thisRight>navigationRight)if(thisLeft=0){var w2=Math.floor($selector.find(".header-left-row .navTile").eq(i).width());all+=w2}if(arrayLength==0)translateX-= all;else{all=all+arrayObj[0];translateX-=all}return false}else{translateX-=Math.floor($selector.find(".header-left-row .navigation").width());return false}});arrayObj.push(translateX)}else translateX=0;$selector.find(".header-left-row .navigation").stop(true).animate({scrollLeft:Math.abs(translateX)});var a2=Math.floor($selector.find(".header-left-row .navigation").width());var a3=ulWidth+translateX-20;var a1=a2+translateX;if(translateX==0){$selector.find(".header-left-row .button-prev").hide();$selector.find(".header-left-row .button-next").show()}else if(a3< a2){$selector.find(".header-left-row .button-prev").show();$selector.find(".header-left-row .button-next").hide()}else{$selector.find(".header-left-row .button-prev").show();$selector.find(".header-left-row .button-next").show()}})}}})(window,jQuery);